//////////////////////////////////////////////////////////////////////
////                                                              ////
////  CFBaseChipScopeTaps.v                                       ////
////                                                              ////
////                                                              ////
////  This file is part of the "Pico E12" project                 ////
////                                                              ////
////                                                              ////
////                                                              ////
//////////////////////////////////////////////////////////////////////
////                                                              ////
//// Copyright (C) 2005, Pico Computing, INC.                     ////
//// http://www.picocomputing.com                                 ////
////                                                              ////
//// This source file may be used and distributed without         ////
//// restriction provided that this copyright statement is not    ////
//// removed from the file and that any derivative work contains  ////
//// the original copyright notice and the associated disclaimer. ////
////                                                              ////
//// This source file is free software; you can redistribute it   ////
//// and/or modify it under the terms of the GNU Lesser General   ////
//// Public License as published by the Free Software Foundation; ////
//// either version 2.1 of the License, or (at your option) any   ////
//// later version.                                               ////
////                                                              ////
//// This source is distributed in the hope that it will be       ////
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
//// PURPOSE.  See the GNU Lesser General Public License for more ////
//// details.                                                     ////
////                                                              ////
//// You should have received a copy of the GNU Lesser General    ////
//// Public License along with this source; if not, download it   ////
//// from http://www.opencores.org/lgpl.shtml                     ////
////                                                              ////
////////////////////////////////////////////////////////////////////JF


//This file allows ChipScope to probe all external pins, and the internal databusses

wire CLOCK1_TAP;
wire CE1_TAP;
wire CE2_TAP;
wire REG_TAP;
wire IORD_TAP;
wire IOWR_TAP; 
wire OE_TAP;
wire WE_TAP;                                    
wire READY_TAP;
wire WAIT_TAP;    
wire WP_IOIS16_TAP;
wire INPACK_TAP; 
wire BVD1_TAP;   
wire BVD2_TAP;                        
wire MASTEREN_TAP; 
wire ADDRESSDIR_TAP;
wire CTRLDIR_TAP; 
wire DATADIRH_TAP; 
wire DATADIRL_TAP;
wire DATATRISH_TAP;
wire DATATRISL_TAP;
wire [15:0]DIN_TAP;
wire [15:0]DOUT_TAP;
wire [10:0]A_TAP;
wire [15:0]DataIn_TAP;
wire [15:0]DataOut_TAP;
wire MemRead_TAP;
wire MemWrite_TAP;
wire AttribRead_TAP;
wire AttribWrite_TAP;
wire IORead_TAP;
wire IOWrite_TAP;

wire [31:0]MemAddress_TAP;
wire [`PCMCIA_ADR_LINES-1:0]IOAddress_TAP;

wire [15:0]FLASH_DIN_TAP;
wire [15:0]FLASH_DOUT_TAP;
wire [25:0]FLASH_AIN_TAP;
wire [25:0]FLASH_AOUT_TAP;
wire FLASH_CE_TAP;
wire FLASH_OE_TAP;
wire FLASH_WE_TAP;
wire FLASH_WP_TAP;
wire FLASH_RESET_TAP;
wire FLASH_BYTE_TAP;
wire FLASH_BUSY_TAP;
wire FLASH_TRIS_D_TAP;
wire FLASH_TRIS_A_TAP;
wire FLASH_TRIS_D15_TAP;
wire FLASH_DOUT15_MUX_TAP;

wire CPLD_PEEKABOO_TAP;
wire CPLD_RELOAD_TAP;

wire JTAG_LOOPBACK_TCK_TAP;
wire JTAG_LOOPBACK_TDI_TAP;
wire JTAG_LOOPBACK_TDO_TAP;
wire JTAG_LOOPBACK_TMS_TAP;

`ifdef ENABLE_GPIO
wire [4:1]GPIO_IN_TAP;
wire [4:1]GPIO_OUT_TAP;
wire [4:1]GPIO_TRIS_TAP;
`endif

wire [127:0] PPCTestPins_TAP;
wire CPUMemMaster_TAP;

wire BackplaneDetected_TAP;
wire DetectorBusy_TAP;

wire MDIO_IN_TAP;
wire MDIO_OUT_TAP;
wire TRIS_MDIO_TAP;
wire MDC_TAP;

//synthesis attribute KEEP of CLOCK1_TAP is TRUE;
//synthesis attribute KEEP of CE1_TAP is TRUE;
//synthesis attribute KEEP of CE2_TAP is TRUE;
//synthesis attribute KEEP of REG_TAP is TRUE;
//synthesis attribute KEEP of IORD_TAP is TRUE;
//synthesis attribute KEEP of IOWR_TAP is TRUE; 
//synthesis attribute KEEP of OE_TAP is TRUE;
//synthesis attribute KEEP of WE_TAP is TRUE;                                    
//synthesis attribute KEEP of READY_TAP is TRUE;
//synthesis attribute KEEP of WAIT_TAP is TRUE;    
//synthesis attribute KEEP of WP_IOIS16_TAP is TRUE;
//synthesis attribute KEEP of INPACK_TAP is TRUE; 
//synthesis attribute KEEP of BVD1_TAP is TRUE;   
//synthesis attribute KEEP of BVD2_TAP is TRUE;                             
//synthesis attribute KEEP of MASTEREN_TAP is TRUE; 
//synthesis attribute KEEP of ADDRESSDIR_TAP is TRUE;
//synthesis attribute KEEP of CTRLDIR_TAP is TRUE; 
//synthesis attribute KEEP of DATADIRH_TAP is TRUE; 
//synthesis attribute KEEP of DATADIRL_TAP is TRUE;
//synthesis attribute KEEP of DATATRISH_TAP is TRUE;
//synthesis attribute KEEP of DATATRISL_TAP is TRUE;
//synthesis attribute KEEP of DIN_TAP is TRUE;
//synthesis attribute KEEP of DOUT_TAP is TRUE;
//synthesis attribute KEEP of A_TAP is TRUE;
//synthesis attribute KEEP of CFClock is TRUE;

//synthesis attribute KEEP of DataIn_TAP is TRUE;
//synthesis attribute KEEP of DataOut_TAP is TRUE;
//synthesis attribute KEEP of AttribRead_TAP is TRUE;
//synthesis attribute KEEP of AttribWrite_TAP is TRUE;
//synthesis attribute KEEP of MemRead_TAP is TRUE;
//synthesis attribute KEEP of MemWrite_TAP is TRUE;
//synthesis attribute KEEP of IORead_TAP is TRUE;
//synthesis attribute KEEP of IOWrite_TAP is TRUE;
//synthesis attribute KEEP of MemAddress_TAP is TRUE;
//synthesis attribute KEEP of IOAddress_TAP is TRUE;

//synthesis attribute KEEP of FLASH_DIN_TAP is TRUE;
//synthesis attribute KEEP of FLASH_DOUT_TAP is TRUE;
//synthesis attribute KEEP of FLASH_AIN_TAP is TRUE;
//synthesis attribute KEEP of FLASH_AOUT_TAP is TRUE;
//synthesis attribute KEEP of FLASH_CE_TAP is TRUE;
//synthesis attribute KEEP of FLASH_OE_TAP is TRUE;
//synthesis attribute KEEP of FLASH_WE_TAP is TRUE;
//synthesis attribute KEEP of FLASH_WP_TAP is TRUE;
//synthesis attribute KEEP of FLASH_BUSY_TAP is TRUE;
//synthesis attribute KEEP of FLASH_RESET_TAP is TRUE;
//synthesis attribute KEEP of FLASH_BYTE_TAP is TRUE;
//synthesis attribute KEEP of FLASH_TRIS_A_TAP is TRUE;
//synthesis attribute KEEP of FLASH_TRIS_D_TAP is TRUE;
//synthesis attribute KEEP of FLASH_DOUT15_MUX_TAP is TRUE;
//synthesis attribute KEEP of FLASH_TRIS_D15_TAP is TRUE;

//synthesis attribute KEEP of CPLD_PEEKABOO_TAP is TRUE;
//synthesis attribute KEEP of CPLD_RELOAD_TAP is TRUE;

//synthesis attribute KEEP of GPIO_IN_TAP is TRUE;
//synthesis attribute KEEP of GPIO_OUT_TAP is TRUE;
//synthesis attribute KEEP of GPIO_TRIS_TAP is TRUE;

//synthesis attribute KEEP of JTAG_LOOPBACK_TMS_TAP is TRUE;
//synthesis attribute KEEP of JTAG_LOOPBACK_TDI_TAP is TRUE;
//synthesis attribute KEEP of JTAG_LOOPBACK_TDO_TAP is TRUE;
//synthesis attribute KEEP of JTAG_LOOPBACK_TCK_TAP is TRUE;

//synthesis attribute KEEP of TRIS_MDIO_TAP is TRUE;
//synthesis attribute KEEP of MDIO_IN_TAP is TRUE;
//synthesis attribute KEEP of MDIO_OUT_TAP is TRUE;
//synthesis attribute KEEP of MDC_TAP is TRUE;

//synthesis attribute KEEP of PPCTestPins_TAP is TRUE;
//synthesis attribute KEEP of CPUMemMaster_TAP is TRUE;

//synthesis attribute KEEP of BackplaneDetected_TAP is TRUE;
//synthesis attribute KEEP of DetectorBusy_TAP is TRUE;

BUF CLOCK1_TAP_BUFG(.I(CLOCK1), .O(CLOCK1_TAP));
BUF CE1_TAP_BUF(.I(CE1), .O(CE1_TAP));
BUF CE2_TAP_BUF(.I(CE2), .O(CE2_TAP));
BUF REG_TAP_BUF(.I(REG), .O(REG_TAP));
BUF IORD_TAP_BUF(.I(IORD), .O(IORD_TAP));
BUF IOWR_TAP_BUF(.I(IOWR), .O(IOWR_TAP));
BUF OE_TAP_BUF(.I(OE), .O(OE_TAP));
BUF WE_TAP_BUF(.I(WE), .O(WE_TAP));

BUF READY_TAP_BUF(.O(READY_TAP), .I(READY));
BUF WAIT_TAP_BUF(.O(WAIT_TAP), .I(WAIT));
BUF WP_IOIS16_TAP_BUF(.O(WP_IOIS16_TAP), .I(WP_IOIS16));
BUF INPACK_TAP_BUF(.O(INPACK_TAP), .I(INPACK));
BUF BVD1_TAP_BUF(.O(BVD1_TAP), .I(BVD1));
BUF BVD2_TAP_BUF(.O(BVD2_TAP), .I(BVD2));
BUF MASTEREN_TAP_BUF(.O(MASTEREN_TAP), .I(MASTEREN));
BUF ADDRESSDIR_TAP_BUF(.O(ADDRESSDIR_TAP), .I(ADDRESSDIR));
BUF CTRLDIR_TAP_BUF(.O(CTRLDIR_TAP), .I(CTRLDIR));
BUF DATADIRH_TAP_BUF(.O(DATADIRH_TAP), .I(DATADIRH));
BUF DATADIRL_TAP_BUF(.O(DATADIRL_TAP), .I(DATADIRL));
BUF DATATRISH_TAP_BUF(.O(DATATRISH_TAP), .I(DATATRISH));
BUF DATATRISL_TAP_BUF(.O(DATATRISL_TAP), .I(DATATRISL));

BUF D0_TAP_IBUF(.O(DOUT_TAP[0]), .I(DOUT[0]));
BUF D1_TAP_IBUF(.O(DOUT_TAP[1]), .I(DOUT[1]));
BUF D2_TAP_IBUF(.O(DOUT_TAP[2]), .I(DOUT[2]));
BUF D3_TAP_IBUF(.O(DOUT_TAP[3]), .I(DOUT[3]));
BUF D4_TAP_IBUF(.O(DOUT_TAP[4]), .I(DOUT[4]));
BUF D5_TAP_IBUF(.O(DOUT_TAP[5]), .I(DOUT[5]));
BUF D6_TAP_IBUF(.O(DOUT_TAP[6]), .I(DOUT[6]));
BUF D7_TAP_IBUF(.O(DOUT_TAP[7]), .I(DOUT[7]));
BUF D8_TAP_IBUF(.O(DOUT_TAP[8]), .I(DOUT[8]));
BUF D9_TAP_IBUF(.O(DOUT_TAP[9]), .I(DOUT[9]));
BUF D10_TAP_IBUF(.O(DOUT_TAP[10]), .I(DOUT[10]));
BUF D11_TAP_IBUF(.O(DOUT_TAP[11]), .I(DOUT[11]));
BUF D12_TAP_IBUF(.O(DOUT_TAP[12]), .I(DOUT[12]));
BUF D13_TAP_IBUF(.O(DOUT_TAP[13]), .I(DOUT[13]));
BUF D14_TAP_IBUF(.O(DOUT_TAP[14]), .I(DOUT[14]));
BUF D15_TAP_IBUF(.O(DOUT_TAP[15]), .I(DOUT[15]));

BUF D0_TAP_OBUF(.O(DIN_TAP[0]), .I(DIN[0]));
BUF D1_TAP_OBUF(.O(DIN_TAP[1]), .I(DIN[1]));
BUF D2_TAP_OBUF(.O(DIN_TAP[2]), .I(DIN[2]));
BUF D3_TAP_OBUF(.O(DIN_TAP[3]), .I(DIN[3]));
BUF D4_TAP_OBUF(.O(DIN_TAP[4]), .I(DIN[4]));
BUF D5_TAP_OBUF(.O(DIN_TAP[5]), .I(DIN[5]));
BUF D6_TAP_OBUF(.O(DIN_TAP[6]), .I(DIN[6]));
BUF D7_TAP_OBUF(.O(DIN_TAP[7]), .I(DIN[7]));
BUF D8_TAP_OBUF(.O(DIN_TAP[8]), .I(DIN[8]));
BUF D9_TAP_OBUF(.O(DIN_TAP[9]), .I(DIN[9]));
BUF D10_TAP_OBUF(.O(DIN_TAP[10]), .I(DIN[10]));
BUF D11_TAP_OBUF(.O(DIN_TAP[11]), .I(DIN[11]));
BUF D12_TAP_OBUF(.O(DIN_TAP[12]), .I(DIN[12]));
BUF D13_TAP_OBUF(.O(DIN_TAP[13]), .I(DIN[13]));
BUF D14_TAP_OBUF(.O(DIN_TAP[14]), .I(DIN[14]));
BUF D15_TAP_OBUF(.O(DIN_TAP[15]), .I(DIN[15]));

BUF A0_TAP_BUF(.I(A[0]), .O(A_TAP[0]));
BUF A1_TAP_BUF(.I(A[1]), .O(A_TAP[1]));
BUF A2_TAP_BUF(.I(A[2]), .O(A_TAP[2]));
BUF A3_TAP_BUF(.I(A[3]), .O(A_TAP[3]));
BUF A4_TAP_BUF(.I(A[4]), .O(A_TAP[4]));
BUF A5_TAP_BUF(.I(A[5]), .O(A_TAP[5]));
BUF A6_TAP_BUF(.I(A[6]), .O(A_TAP[6]));
BUF A7_TAP_BUF(.I(A[7]), .O(A_TAP[7]));
BUF A8_TAP_BUF(.I(A[8]), .O(A_TAP[8]));
BUF A9_TAP_BUF(.I(A[9]), .O(A_TAP[9]));
BUF A10_TAP_BUF(.I(A[10]), .O(A_TAP[10]));

BUF D0_DataIn_TAP_OBUF(.O(DataIn_TAP[0]), .I(DataIn[0]));
BUF D1_DataIn_TAP_OBUF(.O(DataIn_TAP[1]), .I(DataIn[1]));
BUF D2_DataIn_TAP_OBUF(.O(DataIn_TAP[2]), .I(DataIn[2]));
BUF D3_DataIn_TAP_OBUF(.O(DataIn_TAP[3]), .I(DataIn[3]));
BUF D4_DataIn_TAP_OBUF(.O(DataIn_TAP[4]), .I(DataIn[4]));
BUF D5_DataIn_TAP_OBUF(.O(DataIn_TAP[5]), .I(DataIn[5]));
BUF D6_DataIn_TAP_OBUF(.O(DataIn_TAP[6]), .I(DataIn[6]));
BUF D7_DataIn_TAP_OBUF(.O(DataIn_TAP[7]), .I(DataIn[7]));
BUF D8_DataIn_TAP_OBUF(.O(DataIn_TAP[8]), .I(DataIn[8]));
BUF D9_DataIn_TAP_OBUF(.O(DataIn_TAP[9]), .I(DataIn[9]));
BUF D10_DataIn_TAP_OBUF(.O(DataIn_TAP[10]), .I(DataIn[10]));
BUF D11_DataIn_TAP_OBUF(.O(DataIn_TAP[11]), .I(DataIn[11]));
BUF D12_DataIn_TAP_OBUF(.O(DataIn_TAP[12]), .I(DataIn[12]));
BUF D13_DataIn_TAP_OBUF(.O(DataIn_TAP[13]), .I(DataIn[13]));
BUF D14_DataIn_TAP_OBUF(.O(DataIn_TAP[14]), .I(DataIn[14]));
BUF D15_DataIn_TAP_OBUF(.O(DataIn_TAP[15]), .I(DataIn[15]));

BUF D0_DataOut_TAP_OBUF(.O(DataOut_TAP[0]), .I(DataOut[0]));
BUF D1_DataOut_TAP_OBUF(.O(DataOut_TAP[1]), .I(DataOut[1]));
BUF D2_DataOut_TAP_OBUF(.O(DataOut_TAP[2]), .I(DataOut[2]));
BUF D3_DataOut_TAP_OBUF(.O(DataOut_TAP[3]), .I(DataOut[3]));
BUF D4_DataOut_TAP_OBUF(.O(DataOut_TAP[4]), .I(DataOut[4]));
BUF D5_DataOut_TAP_OBUF(.O(DataOut_TAP[5]), .I(DataOut[5]));
BUF D6_DataOut_TAP_OBUF(.O(DataOut_TAP[6]), .I(DataOut[6]));
BUF D7_DataOut_TAP_OBUF(.O(DataOut_TAP[7]), .I(DataOut[7]));
BUF D8_DataOut_TAP_OBUF(.O(DataOut_TAP[8]), .I(DataOut[8]));
BUF D9_DataOut_TAP_OBUF(.O(DataOut_TAP[9]), .I(DataOut[9]));
BUF D10_DataOut_TAP_OBUF(.O(DataOut_TAP[10]), .I(DataOut[10]));
BUF D11_DataOut_TAP_OBUF(.O(DataOut_TAP[11]), .I(DataOut[11]));
BUF D12_DataOut_TAP_OBUF(.O(DataOut_TAP[12]), .I(DataOut[12]));
BUF D13_DataOut_TAP_OBUF(.O(DataOut_TAP[13]), .I(DataOut[13]));
BUF D14_DataOut_TAP_OBUF(.O(DataOut_TAP[14]), .I(DataOut[14]));
BUF D15_DataOut_TAP_OBUF(.O(DataOut_TAP[15]), .I(DataOut[15]));

BUF MemRead_TAP_BUF(.O(MemRead_TAP), .I(MemRead));
BUF MemWrite_TAP_BUF(.O(MemWrite_TAP), .I(MemWrite));
BUF AttribRead_TAP_BUF(.O(AttribRead_TAP), .I(AttribRead));
BUF AttribWrite_TAP_BUF(.O(AttribWrite_TAP), .I(AttribWrite));
BUF IORead_TAP_BUF(.O(IORead_TAP), .I(IORead));
BUF IOWrite_TAP_BUF(.O(IOWrite_TAP), .I(IOWrite));

BUF A0_IOAddress_TAP_BUF(.I(IOAddress[0]), .O(IOAddress_TAP[0]));
BUF A1_IOAddress_TAP_BUF(.I(IOAddress[1]), .O(IOAddress_TAP[1]));
BUF A2_IOAddress_TAP_BUF(.I(IOAddress[2]), .O(IOAddress_TAP[2]));
BUF A3_IOAddress_TAP_BUF(.I(IOAddress[3]), .O(IOAddress_TAP[3]));
BUF A4_IOAddress_TAP_BUF(.I(IOAddress[4]), .O(IOAddress_TAP[4]));
BUF A5_IOAddress_TAP_BUF(.I(IOAddress[5]), .O(IOAddress_TAP[5]));
BUF A6_IOAddress_TAP_BUF(.I(IOAddress[6]), .O(IOAddress_TAP[6]));
BUF A7_IOAddress_TAP_BUF(.I(IOAddress[7]), .O(IOAddress_TAP[7]));
//BUF A8_IOAddress_TAP_BUF(.I(IOAddress[8]), .O(IOAddress_TAP[8]));
//BUF A9_IOAddress_TAP_BUF(.I(IOAddress[9]), .O(IOAddress_TAP[9]));
//BUF A10_IOAddress_TAP_BUF(.I(IOAddress[10]), .O(IOAddress_TAP[10]));

BUF A0_MemAddress_TAP_BUF(.I(MemAddress[0]), .O(MemAddress_TAP[0]));
BUF A1_MemAddress_TAP_BUF(.I(MemAddress[1]), .O(MemAddress_TAP[1]));
BUF A2_MemAddress_TAP_BUF(.I(MemAddress[2]), .O(MemAddress_TAP[2]));
BUF A3_MemAddress_TAP_BUF(.I(MemAddress[3]), .O(MemAddress_TAP[3]));
BUF A4_MemAddress_TAP_BUF(.I(MemAddress[4]), .O(MemAddress_TAP[4]));
BUF A5_MemAddress_TAP_BUF(.I(MemAddress[5]), .O(MemAddress_TAP[5]));
BUF A6_MemAddress_TAP_BUF(.I(MemAddress[6]), .O(MemAddress_TAP[6]));
BUF A7_MemAddress_TAP_BUF(.I(MemAddress[7]), .O(MemAddress_TAP[7]));
BUF A8_MemAddress_TAP_BUF(.I(MemAddress[8]), .O(MemAddress_TAP[8]));
BUF A9_MemAddress_TAP_BUF(.I(MemAddress[9]), .O(MemAddress_TAP[9]));
BUF A10_MemAddress_TAP_BUF(.I(MemAddress[10]), .O(MemAddress_TAP[10]));
BUF A11_MemAddress_TAP_BUF(.I(MemAddress[11]), .O(MemAddress_TAP[11]));
BUF A12_MemAddress_TAP_BUF(.I(MemAddress[12]), .O(MemAddress_TAP[12]));
BUF A13_MemAddress_TAP_BUF(.I(MemAddress[13]), .O(MemAddress_TAP[13]));
BUF A14_MemAddress_TAP_BUF(.I(MemAddress[14]), .O(MemAddress_TAP[14]));
BUF A15_MemAddress_TAP_BUF(.I(MemAddress[15]), .O(MemAddress_TAP[15]));
BUF A16_MemAddress_TAP_BUF(.I(MemAddress[16]), .O(MemAddress_TAP[16]));
BUF A17_MemAddress_TAP_BUF(.I(MemAddress[17]), .O(MemAddress_TAP[17]));
BUF A18_MemAddress_TAP_BUF(.I(MemAddress[18]), .O(MemAddress_TAP[18]));
BUF A19_MemAddress_TAP_BUF(.I(MemAddress[19]), .O(MemAddress_TAP[19]));
BUF A20_MemAddress_TAP_BUF(.I(MemAddress[20]), .O(MemAddress_TAP[20]));
BUF A21_MemAddress_TAP_BUF(.I(MemAddress[21]), .O(MemAddress_TAP[21]));
BUF A22_MemAddress_TAP_BUF(.I(MemAddress[22]), .O(MemAddress_TAP[22]));
BUF A23_MemAddress_TAP_BUF(.I(MemAddress[23]), .O(MemAddress_TAP[23]));
BUF A24_MemAddress_TAP_BUF(.I(MemAddress[24]), .O(MemAddress_TAP[24]));
BUF A25_MemAddress_TAP_BUF(.I(MemAddress[25]), .O(MemAddress_TAP[25]));
BUF A26_MemAddress_TAP_BUF(.I(MemAddress[26]), .O(MemAddress_TAP[26]));
BUF A27_MemAddress_TAP_BUF(.I(MemAddress[27]), .O(MemAddress_TAP[27]));
BUF A28_MemAddress_TAP_BUF(.I(MemAddress[28]), .O(MemAddress_TAP[28]));
BUF A29_MemAddress_TAP_BUF(.I(MemAddress[29]), .O(MemAddress_TAP[29]));
BUF A30_MemAddress_TAP_BUF(.I(MemAddress[30]), .O(MemAddress_TAP[30]));
BUF A31_MemAddress_TAP_BUF(.I(MemAddress[31]), .O(MemAddress_TAP[31]));

BUF FLASH_CE_TAP_BUF(.I(FLASH_CE), .O(FLASH_CE_TAP));
BUF FLASH_OE_TAP_BUF(.I(FLASH_OE), .O(FLASH_OE_TAP));
BUF FLASH_FLASH_WE_TAP_BUF(.I(FLASH_WE), .O(FLASH_WE_TAP));
BUF FLASH_WP_TAP_BUF(.I(FLASH_WP), .O(FLASH_WP_TAP));
BUF FLASH_BUSY_TAP_BUF(.I(FLASH_BUSY), .O(FLASH_BUSY_TAP));
BUF FLASH_RESET_TAP_BUF(.I(FLASH_RESET), .O(FLASH_RESET_TAP));
BUF FLASH_BYTE_TAP_BUF(.I(FLASH_BYTE), .O(FLASH_BYTE_TAP));
BUF FLASH_TRIS_A_BUF(.I(FLASH_TRIS_A), .O(FLASH_TRIS_A_TAP));
BUF FLASH_TRIS_D_BUF(.I(FLASH_TRIS_D), .O(FLASH_TRIS_D_TAP));
BUF FLASH_TRIS_D15_BUF(.I(FLASH_TRIS_D15), .O(FLASH_TRIS_D15_TAP));
BUF FLASH_DOUT15_MUX_BUF(.I(FLASH_DOUT15_MUX), .O(FLASH_DOUT15_MUX_TAP));

BUF D0_FLASH_DIN_TAP_OBUF(.O(FLASH_DIN_TAP[0]), .I(FLASH_DIN[0]));
BUF D1_FLASH_DIN_TAP_OBUF(.O(FLASH_DIN_TAP[1]), .I(FLASH_DIN[1]));
BUF D2_FLASH_DIN_TAP_OBUF(.O(FLASH_DIN_TAP[2]), .I(FLASH_DIN[2]));
BUF D3_FLASH_DIN_TAP_OBUF(.O(FLASH_DIN_TAP[3]), .I(FLASH_DIN[3]));
BUF D4_FLASH_DIN_TAP_OBUF(.O(FLASH_DIN_TAP[4]), .I(FLASH_DIN[4]));
BUF D5_FLASH_DIN_TAP_OBUF(.O(FLASH_DIN_TAP[5]), .I(FLASH_DIN[5]));
BUF D6_FLASH_DIN_TAP_OBUF(.O(FLASH_DIN_TAP[6]), .I(FLASH_DIN[6]));
BUF D7_FLASH_DIN_TAP_OBUF(.O(FLASH_DIN_TAP[7]), .I(FLASH_DIN[7]));
BUF D8_FLASH_DIN_TAP_OBUF(.O(FLASH_DIN_TAP[8]), .I(FLASH_DIN[8]));
BUF D9_FLASH_DIN_TAP_OBUF(.O(FLASH_DIN_TAP[9]), .I(FLASH_DIN[9]));
BUF D10_FLASH_DIN_TAP_OBUF(.O(FLASH_DIN_TAP[10]), .I(FLASH_DIN[10]));
BUF D11_FLASH_DIN_TAP_OBUF(.O(FLASH_DIN_TAP[11]), .I(FLASH_DIN[11]));
BUF D12_FLASH_DIN_TAP_OBUF(.O(FLASH_DIN_TAP[12]), .I(FLASH_DIN[12]));
BUF D13_FLASH_DIN_TAP_OBUF(.O(FLASH_DIN_TAP[13]), .I(FLASH_DIN[13]));
BUF D14_FLASH_DIN_TAP_OBUF(.O(FLASH_DIN_TAP[14]), .I(FLASH_DIN[14]));
BUF D15_FLASH_DIN_TAP_OBUF(.O(FLASH_DIN_TAP[15]), .I(FLASH_DIN[15]));

BUF D0_FLASH_DOUT_TAP_OBUF(.O(FLASH_DOUT_TAP[0]), .I(FLASH_DOUT[0]));
BUF D1_FLASH_DOUT_TAP_OBUF(.O(FLASH_DOUT_TAP[1]), .I(FLASH_DOUT[1]));
BUF D2_FLASH_DOUT_TAP_OBUF(.O(FLASH_DOUT_TAP[2]), .I(FLASH_DOUT[2]));
BUF D3_FLASH_DOUT_TAP_OBUF(.O(FLASH_DOUT_TAP[3]), .I(FLASH_DOUT[3]));
BUF D4_FLASH_DOUT_TAP_OBUF(.O(FLASH_DOUT_TAP[4]), .I(FLASH_DOUT[4]));
BUF D5_FLASH_DOUT_TAP_OBUF(.O(FLASH_DOUT_TAP[5]), .I(FLASH_DOUT[5]));
BUF D6_FLASH_DOUT_TAP_OBUF(.O(FLASH_DOUT_TAP[6]), .I(FLASH_DOUT[6]));
BUF D7_FLASH_DOUT_TAP_OBUF(.O(FLASH_DOUT_TAP[7]), .I(FLASH_DOUT[7]));
BUF D8_FLASH_DOUT_TAP_OBUF(.O(FLASH_DOUT_TAP[8]), .I(FLASH_DOUT[8]));
BUF D9_FLASH_DOUT_TAP_OBUF(.O(FLASH_DOUT_TAP[9]), .I(FLASH_DOUT[9]));
BUF D10_FLASH_DOUT_TAP_OBUF(.O(FLASH_DOUT_TAP[10]), .I(FLASH_DOUT[10]));
BUF D11_FLASH_DOUT_TAP_OBUF(.O(FLASH_DOUT_TAP[11]), .I(FLASH_DOUT[11]));
BUF D12_FLASH_DOUT_TAP_OBUF(.O(FLASH_DOUT_TAP[12]), .I(FLASH_DOUT[12]));
BUF D13_FLASH_DOUT_TAP_OBUF(.O(FLASH_DOUT_TAP[13]), .I(FLASH_DOUT[13]));
BUF D14_FLASH_DOUT_TAP_OBUF(.O(FLASH_DOUT_TAP[14]), .I(FLASH_DOUT[14]));
BUF D15_FLASH_DOUT_TAP_OBUF(.O(FLASH_DOUT_TAP[15]), .I(FLASH_DOUT[15]));

BUF A0_FLASH_AIN_TAP_BUF(.I(FLASH_AIN[0]), .O(FLASH_AIN_TAP[0]));
BUF A1_FLASH_AIN_TAP_BUF(.I(FLASH_AIN[1]), .O(FLASH_AIN_TAP[1]));
BUF A2_FLASH_AIN_TAP_BUF(.I(FLASH_AIN[2]), .O(FLASH_AIN_TAP[2]));
BUF A3_FLASH_AIN_TAP_BUF(.I(FLASH_AIN[3]), .O(FLASH_AIN_TAP[3]));
BUF A4_FLASH_AIN_TAP_BUF(.I(FLASH_AIN[4]), .O(FLASH_AIN_TAP[4]));
BUF A5_FLASH_AIN_TAP_BUF(.I(FLASH_AIN[5]), .O(FLASH_AIN_TAP[5]));
BUF A6_FLASH_AIN_TAP_BUF(.I(FLASH_AIN[6]), .O(FLASH_AIN_TAP[6]));
BUF A7_FLASH_AIN_TAP_BUF(.I(FLASH_AIN[7]), .O(FLASH_AIN_TAP[7]));
BUF A8_FLASH_AIN_TAP_BUF(.I(FLASH_AIN[8]), .O(FLASH_AIN_TAP[8]));
BUF A9_FLASH_AIN_TAP_BUF(.I(FLASH_AIN[9]), .O(FLASH_AIN_TAP[9]));
BUF A10_FLASH_AIN_TAP_BUF(.I(FLASH_AIN[10]), .O(FLASH_AIN_TAP[10]));
BUF A11_FLASH_AIN_TAP_BUF(.I(FLASH_AIN[11]), .O(FLASH_AIN_TAP[11]));
BUF A12_FLASH_AIN_TAP_BUF(.I(FLASH_AIN[12]), .O(FLASH_AIN_TAP[12]));
BUF A13_FLASH_AIN_TAP_BUF(.I(FLASH_AIN[13]), .O(FLASH_AIN_TAP[13]));
BUF A14_FLASH_AIN_TAP_BUF(.I(FLASH_AIN[14]), .O(FLASH_AIN_TAP[14]));
BUF A15_FLASH_AIN_TAP_BUF(.I(FLASH_AIN[15]), .O(FLASH_AIN_TAP[15]));
BUF A16_FLASH_AIN_TAP_BUF(.I(FLASH_AIN[16]), .O(FLASH_AIN_TAP[16]));
BUF A17_FLASH_AIN_TAP_BUF(.I(FLASH_AIN[17]), .O(FLASH_AIN_TAP[17]));
BUF A18_FLASH_AIN_TAP_BUF(.I(FLASH_AIN[18]), .O(FLASH_AIN_TAP[18]));
BUF A19_FLASH_AIN_TAP_BUF(.I(FLASH_AIN[19]), .O(FLASH_AIN_TAP[19]));
BUF A20_FLASH_AIN_TAP_BUF(.I(FLASH_AIN[20]), .O(FLASH_AIN_TAP[20]));
BUF A21_FLASH_AIN_TAP_BUF(.I(FLASH_AIN[21]), .O(FLASH_AIN_TAP[21]));
BUF A22_FLASH_AIN_TAP_BUF(.I(FLASH_AIN[22]), .O(FLASH_AIN_TAP[22]));
BUF A23_FLASH_AIN_TAP_BUF(.I(FLASH_AIN[23]), .O(FLASH_AIN_TAP[23]));
BUF A24_FLASH_AIN_TAP_BUF(.I(FLASH_AIN[24]), .O(FLASH_AIN_TAP[24]));
BUF A25_FLASH_AIN_TAP_BUF(.I(FLASH_AIN[25]), .O(FLASH_AIN_TAP[25]));

BUF A0_FLASH_AOUT_TAP_BUF(.I(FLASH_AOUT[0]), .O(FLASH_AOUT_TAP[0]));
BUF A1_FLASH_AOUT_TAP_BUF(.I(FLASH_AOUT[1]), .O(FLASH_AOUT_TAP[1]));
BUF A2_FLASH_AOUT_TAP_BUF(.I(FLASH_AOUT[2]), .O(FLASH_AOUT_TAP[2]));
BUF A3_FLASH_AOUT_TAP_BUF(.I(FLASH_AOUT[3]), .O(FLASH_AOUT_TAP[3]));
BUF A4_FLASH_AOUT_TAP_BUF(.I(FLASH_AOUT[4]), .O(FLASH_AOUT_TAP[4]));
BUF A5_FLASH_AOUT_TAP_BUF(.I(FLASH_AOUT[5]), .O(FLASH_AOUT_TAP[5]));
BUF A6_FLASH_AOUT_TAP_BUF(.I(FLASH_AOUT[6]), .O(FLASH_AOUT_TAP[6]));
BUF A7_FLASH_AOUT_TAP_BUF(.I(FLASH_AOUT[7]), .O(FLASH_AOUT_TAP[7]));
BUF A8_FLASH_AOUT_TAP_BUF(.I(FLASH_AOUT[8]), .O(FLASH_AOUT_TAP[8]));
BUF A9_FLASH_AOUT_TAP_BUF(.I(FLASH_AOUT[9]), .O(FLASH_AOUT_TAP[9]));
BUF A10_FLASH_AOUT_TAP_BUF(.I(FLASH_AOUT[10]), .O(FLASH_AOUT_TAP[10]));
BUF A11_FLASH_AOUT_TAP_BUF(.I(FLASH_AOUT[11]), .O(FLASH_AOUT_TAP[11]));
BUF A12_FLASH_AOUT_TAP_BUF(.I(FLASH_AOUT[12]), .O(FLASH_AOUT_TAP[12]));
BUF A13_FLASH_AOUT_TAP_BUF(.I(FLASH_AOUT[13]), .O(FLASH_AOUT_TAP[13]));
BUF A14_FLASH_AOUT_TAP_BUF(.I(FLASH_AOUT[14]), .O(FLASH_AOUT_TAP[14]));
BUF A15_FLASH_AOUT_TAP_BUF(.I(FLASH_AOUT[15]), .O(FLASH_AOUT_TAP[15]));
BUF A16_FLASH_AOUT_TAP_BUF(.I(FLASH_AOUT[16]), .O(FLASH_AOUT_TAP[16]));
BUF A17_FLASH_AOUT_TAP_BUF(.I(FLASH_AOUT[17]), .O(FLASH_AOUT_TAP[17]));
BUF A18_FLASH_AOUT_TAP_BUF(.I(FLASH_AOUT[18]), .O(FLASH_AOUT_TAP[18]));
BUF A19_FLASH_AOUT_TAP_BUF(.I(FLASH_AOUT[19]), .O(FLASH_AOUT_TAP[19]));
BUF A20_FLASH_AOUT_TAP_BUF(.I(FLASH_AOUT[20]), .O(FLASH_AOUT_TAP[20]));
BUF A21_FLASH_AOUT_TAP_BUF(.I(FLASH_AOUT[21]), .O(FLASH_AOUT_TAP[21]));
BUF A22_FLASH_AOUT_TAP_BUF(.I(FLASH_AOUT[22]), .O(FLASH_AOUT_TAP[22]));
BUF A23_FLASH_AOUT_TAP_BUF(.I(FLASH_AOUT[23]), .O(FLASH_AOUT_TAP[23]));
BUF A24_FLASH_AOUT_TAP_BUF(.I(FLASH_AOUT[24]), .O(FLASH_AOUT_TAP[24]));
BUF A25_FLASH_AOUT_TAP_BUF(.I(FLASH_AOUT[25]), .O(FLASH_AOUT_TAP[25]));

BUF CPLD_PEEKABOO_TAP_BUF(.I(CPLD_PEEKABOO), .O(CPLD_PEEKABOO_TAP));
BUF CPLD_RELOAD_TAP_BUF(.I(CPLD_RELOAD), .O(CPLD_RELOAD_TAP));

BUF JTAG_LOOPBACK_TCK_TAP_BUF(.I(JTAG_LOOPBACK_TCK), .O(JTAG_LOOPBACK_TCK_TAP));
BUF JTAG_LOOPBACK_TDI_TAP_BUF(.I(JTAG_LOOPBACK_TDI), .O(JTAG_LOOPBACK_TDI_TAP));
BUF JTAG_LOOPBACK_TDO_TAP_BUF(.I(JTAG_LOOPBACK_TDO), .O(JTAG_LOOPBACK_TDO_TAP));
BUF JTAG_LOOPBACK_TMS_TAP_BUF(.I(JTAG_LOOPBACK_TMS), .O(JTAG_LOOPBACK_TMS_TAP));

`ifdef ENABLE_GPIO
BUF GPIO_IN1_TAP_BUF(.I(GPIO_IN[1]), .O(GPIO_IN_TAP[1]));
BUF GPIO_IN2_TAP_BUF(.I(GPIO_IN[2]), .O(GPIO_IN_TAP[2]));
BUF GPIO_IN3_TAP_BUF(.I(GPIO_IN[3]), .O(GPIO_IN_TAP[3]));
BUF GPIO_IN4_TAP_BUF(.I(GPIO_IN[4]), .O(GPIO_IN_TAP[4]));

BUF GPIO_OUT1_TAP_BUF(.I(GPIO_OUT[1]), .O(GPIO_OUT_TAP[1]));
BUF GPIO_OUT2_TAP_BUF(.I(GPIO_OUT[2]), .O(GPIO_OUT_TAP[2]));
BUF GPIO_OUT3_TAP_BUF(.I(GPIO_OUT[3]), .O(GPIO_OUT_TAP[3]));
BUF GPIO_OUT4_TAP_BUF(.I(GPIO_OUT[4]), .O(GPIO_OUT_TAP[4]));

BUF GPIO_TRIS1_TAP_BUF(.I(GPIO_TRIS[1]), .O(GPIO_TRIS_TAP[1]));
BUF GPIO_TRIS2_TAP_BUF(.I(GPIO_TRIS[2]), .O(GPIO_TRIS_TAP[2]));
BUF GPIO_TRIS3_TAP_BUF(.I(GPIO_TRIS[3]), .O(GPIO_TRIS_TAP[3]));
BUF GPIO_TRIS4_TAP_BUF(.I(GPIO_TRIS[4]), .O(GPIO_TRIS_TAP[4]));
`endif

`ifdef ENABLE_MDIO
BUF MDIO_IN_BUF(.I(MDIO_IN), .O(MDIO_IN_TAP));
BUF MDIO_OUT_BUF(.I(MDIO_OUT), .O(MDIO_OUT_TAP));
BUF MDIO_TRIS_BUF(.I(TRIS_MDIO), .O(TRIS_MDIO_TAP));
BUF MDIO_CLK_BUF(.I(MDC), .O(MDC_TAP));
`endif 

BUF CPUMemMaster_TAP_BUF(.I(CPUMemMaster), .O(CPUMemMaster_TAP));

BUF DetectorBusy_TAP_BUF(.I(DetectorBusy), .O(DetectorBusy_TAP));
BUF BackplaneDetected_TAP_BUF(.I(BackplaneDetected), .O(BackplaneDetected_TAP));